#ifndef _DS_LINK_QUEUE_H
#define _DS_LINK_QUEUE_H

#include "../ds_types.h"

/* diff with link_list: q is inited and just modify the member of q */
extern Status linkqueue_init(link_queue *q, size_t struct_size);

extern Status linkqueue_destroy(link_queue *q);

extern Status linkqueue_clear(link_queue *q);

static inline Bool linkqueue_empty(link_queue q)
{
	return q.front == q.rear;
}

extern size_t linkqueue_length(link_queue q);

extern Status linkqueue_gethead(link_queue q, void * e);

extern Status linkqueue_enter(link_queue *q, const void *e);

extern Status linkqueue_delete(link_queue *q, void *e);

extern Status linkqueue_traverse(link_queue q, Bool visit(const void *));


#endif
